package com.chequan.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.chequan.base.CommonResult;
import com.chequan.entity.Car;
import com.chequan.service.CarService;



@RestController
@RequestMapping("/car")
public class CarController {
	
	@Autowired
	private CarService carService;
	
	@Value("${server.port}")
	private String port;

	@GetMapping("/infoList/{carId}")
	public CommonResult<Car> findInfoList(@PathVariable("carId") String carId) throws Exception {
		System.out.println(port+":*********************:"+carId);
		Car car = carService.selectInfoById("00000fca737611eabdfa00163e16e00c");
	
		return new CommonResult<Car>("200","success",car);
	}

}
